﻿<?xml version="1.0" encoding="utf-8" ?>
<Feature id="UserManagement" name="User Management Feature" >
  <BusinessRules>
	  <BusinessRule name="getMembershipLimitsDisplayTemplate" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  <BusinessRule name="deleteUser" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
	</BusinessRule>
	  
	  <BusinessRule name="isShortNameUnique" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  <BusinessRule name="isUserNameUnique" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  <BusinessRule name="getUserFromUserName" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  <BusinessRule name="updateUserPassword" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="updateUserInfo"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="addGroup"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="deleteGroup"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
	  <BusinessRule name="updateUserGroupAppFunctions"  security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
    <BusinessRule name="updateGroup"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="setGroupAlbumGroupPrivilege"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="setupUserProfile"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
	</BusinessRule>
	<BusinessRule name="checkRootCompany"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="createCompany"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
  
	<BusinessRule name="newCompanySignUp"  security="disabled">
	  <Option value="$UserManagementRemoteTier$">
		  <RemoteRule url="$UserManagementRemoteTier$" />
		  <LocalClass name="UserManagement.BizRules,ScsCore" />
	  </Option>
	</BusinessRule>
	  
	  <BusinessRule name="updateCompany"  security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
	</BusinessRule>
	  <BusinessRule name="getUserCompanyId" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
	  <BusinessRule name="getUser" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>

	  <BusinessRule name="getCompanyUserGroups" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  <BusinessRule name="getUserGroupDetail" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  
	  <BusinessRule name="getCompanyUserGroupList" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="getUserGroupDetails" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
	</BusinessRule>

	  <BusinessRule name="getCompleteUserGroupListWithUserMembership" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  <BusinessRule name="getUserUserGroups" security="disabled">
		  <Option value="$UserManagementRemoteTier$">
			  <RemoteRule url="$UserManagementRemoteTier$" />
			  <LocalClass name="UserManagement.BizRules,ScsCore" />
		  </Option>
	  </BusinessRule>
	  <BusinessRule name="getCompanyUserList" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="canAutoCreate" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="createSelectControl" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>
    <BusinessRule name="setUserUserGroupMembership" security="disabled">
		<Option value="$UserManagementRemoteTier$">
			<RemoteRule url="$UserManagementRemoteTier$" />
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</Option>
    </BusinessRule>

	  <BusinessRule name="getLimitsDisplayTemplate" security="disabled" >
		  <LocalClass name="UserManagement.UserManagementTemplateBizRules,ScsCore" />
	  </BusinessRule>
	  <BusinessRule name="getUserLimitsDisplayTemplate" security="disabled" >
		  <LocalClass name="UserManagement.UserManagementTemplateBizRules,ScsCore" />
	  </BusinessRule>
	  <BusinessRule name="getCompanySettingsDisplayTemplate" security="disabled" >
		  <LocalClass name="UserManagement.UserManagementTemplateBizRules,ScsCore" />
	  </BusinessRule>
	  <BusinessRule name="getCompanyUsersBackupRestoreTemplate" security="disabled" postExtends="getBackupRestoreDeploymentOtionDisplay" >
		  <LocalClass name="UserManagement.UserManagementTemplateBizRules,ScsCore" />
	  </BusinessRule>

  </BusinessRules>

	<BusinessRules>
		<BusinessRule name="restoreCompanyUserUserGroups" security="disabled">
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</BusinessRule>
		<BusinessRule name="backupCompanyUserUserGroups" security="disabled" >
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</BusinessRule>

		<BusinessRule name="postExtendUserUserGroupexecuteCompanyBackup" security="disabled" postExtends="executeCompanyBackup">
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</BusinessRule>
		<BusinessRule name="postExtendUserUserGroupexecuteCompanyRestore" security="disabled" postExtends="executeLastSetRestoreFromZip">
			<LocalClass name="UserManagement.BizRules,ScsCore" />
		</BusinessRule>
	</BusinessRules>


	<BusinessObjects>
		<BusinessObject type="Privilege" key="id" >
		  <Field name="id" type="Integer" />
		  <Field name="name" type="String" />
		  <Field name="description" type="String" />
		</BusinessObject>
		
		<BusinessObject injects="CompanyBackup">
			<Field name="includeUsers" type="Boolean" />
		</BusinessObject>
  </BusinessObjects>
  <ApplicationData>
    <Entry name="userLoginOptions.defaultAnonymousUserGroup" type="IBizObj.UserGroup">
      <UserGroup name="AnonymousUsers" description="Used for anonymous access privilege settings">
        <appPrivileges>
			<AppFunction id="ManageCompanyConfiguration" privilege="0" />
			<AppFunction id="ManageUsers" privilege="0" />
			<AppFunction id="DefaultPrivilege" privilege="3" />
        </appPrivileges>
      </UserGroup>
    </Entry>
    <Entry name="userLoginOptions.defaultAnonymousUser" type="IBizObj.User">
      <User userName="anonymous" password="anonymous" firstName="anonymous" lastName="anon" companyId="" >
      </User>
    </Entry>
    <Entry name="userLoginOptions.defaultAdminUserGroup" type="IBizObj.UserGroup">
      <UserGroup name="AdminUsers" description="Used for administrators access privilege settings">
        <appPrivileges>
          <AppFunction id="ManageUsers" privilege="6" />
          <AppFunction id="DefaultPrivilege" privilege="6" />
          <AppFunction id="ManageAlbumGroups" privilege="6" />
		</appPrivileges>
      </UserGroup>
    </Entry>
    <Entry name="userLoginOptions.defaultAdminUser" type="IBizObj.User">
      <User userName="admin" password="admin" firstName="administrator" lastName="admin" companyId="" >
      </User>
    </Entry>
    <Entry name="userLoginOptions.defaultCompany" type="IBizObj.Company">
      <Company name="Syrinx, Inc." anonymousId="" shortName="syrinx.ph"  canCreateChildCompanies="true" ><parentId><NULL/></parentId></Company>
    </Entry>

    <Entry name="userLoginOptions.privilegeLevels" type="IBizObjList.Privilege">
      <Privileges>
        <Privilege id="-1" name ="Not Set" />
        <Privilege id="0" name="None" />
        <Privilege id="1" name ="Derived" />
        <Privilege id="2" name ="Execute" />
        <Privilege id="3" name ="ReadOnly" />
        <Privilege id="4" name ="AddOnly" />
        <Privilege id="5" name ="EditOnly" />
        <Privilege id="6" name ="Edit" />
        <Privilege id="7" name ="Add" />
        <Privilege id="8" name ="Delete" />
      </Privileges>
    </Entry>
		<Entry name="CompanyUserContactsFilter" type="IBizObj.FilterSortOptions">
			<FilterSortOptions> <filterOptions>
				<FilterCriteria field="isUser" criteria="=" value="True"/>
			</filterOptions> </FilterSortOptions>
		</Entry>
  </ApplicationData>
  <ApplicationEvents>
    <ApplicationStart>
      <Rule method="checkRootCompany" paramHandling="specifiedOnly">
        <Params/>
      </Rule>
    </ApplicationStart>
  </ApplicationEvents>

	<ClassFactory id="BizProcs">
		<Class type="UserManagement.Gui.CompanyManagementBizProc,ScsCore" name="company"/>
		<Class type="UserManagement.Gui.UserGroupManagementBizProc,ScsCore" name="userGroup"/>
		<Class type="UserManagement.Gui.UserGroupAppFunctionBizProc,ScsCore" name="userGroupAppFunctions"/>
		<Class type="UserManagement.Gui.UserManagementBizProc,ScsCore" name="user"/>
		<Class type="UserManagement.Gui.UserUserGroupMembershipBizProc,ScsCore" name="userUserGroups"/>
		<Class type="UserManagement.Gui.UserProfileBizProc,ScsCore" name="userProfile"/>
		<Class type="UserManagement.Gui.UserSignUpBizProc,ScsCore" name="userSignUp"/>

	</ClassFactory>
</Feature>
